-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: aggregate projects into workspaces #18500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Exact data can be seen here (internal link only available to staff). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 15 out of 31 changed files in this pull request and generated no comments.
Files not reviewed (16)
- MODULE.bazel: Language not supported
- misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel: Language not supported
- misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_spanned-0.6.8.bazel: Language not supported
- misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml-0.8.19.bazel: Language not supported
- misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml_datetime-0.6.8.bazel: Language not supported
- misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml_edit-0.22.22.bazel: Language not supported
- misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.winnow-0.6.24.bazel: Language not supported
- misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl: Language not supported
- rust/ql/.generated.list: Language not supported
- rust/ql/integration-tests/hello-project/diagnostics.expected: Language not supported
- rust/ql/integration-tests/hello-project/steps.cargo.expected: Language not supported
- rust/ql/integration-tests/hello-project/steps.rust-project.expected: Language not supported
- rust/ql/integration-tests/hello-project/summary.expected: Language not supported
- rust/ql/integration-tests/hello-workspace/diagnostics.cargo.expected: Language not supported
- rust/ql/integration-tests/hello-workspace/diagnostics.rust-project.expected: Language not supported
- rust/ql/integration-tests/hello-workspace/steps.cargo.expected: Language not supported
Comments suppressed due to low confidence (4)
rust/extractor/src/rust_analyzer.rs:167
- [nitpick] The error message could be more descriptive. Consider providing more context about the error.
return Err(anyhow::anyhow!("{manifest} not a cargo manifest"));
rust/extractor/src/rust_analyzer.rs:216
- Using
unwrap_orcan potentially cause a panic. Consider handling the error more gracefully.
let workspace = find_workspace(&mut reader, &manifest).unwrap_or(manifest);
rust/extractor/src/rust_analyzer.rs:134
- Ensure that there are tests covering the new behavior introduced by the
ToMlReaderstruct and its methods.
struct ToMlReader {
rust/extractor/src/rust_analyzer.rs:204
- Ensure that there are tests covering the new behavior introduced by the
find_project_manifestsfunction.
pub fn find_project_manifests(
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
rust/extractor/src/rust_analyzer.rs
Outdated
| workspace: Option<CargoManifestMembersSlice>, | ||
| } | ||
|
|
||
| struct ToMlReader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ToMl and not Toml ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, typo because of a brain fart 😆
aibaars
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just wondering why you wrote ToMl?
Fixed now, mind reapproving? |
This adds logic to pick up
Cargo.tomlworkspaces over its members, loading a whole workspace intorust-analyzerinstead of its members one by one. On our DCA sources this is showing a ~34% average database extraction speedup. The actual speedup is a bit spread out, from a minimum of ~0.6% to a maximum of -75%. The median is at ~25%. More importantly though, no project has seen any slowdown, and the slowest e2e timing in our DCA sources has seen a 37% reduction.